//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.zqj.project.common.exception;

import com.zqj.project.common.exception.code.BaseExceptionCode;

import java.io.Serial;

/**
 * @Description: ForbiddenException
 * @Author: 22001010704 Zhang Qijian
 * @CreateTime: 2024/6/17 21:05
 * @Version: 1.0
 */
public class ForbiddenException extends BaseUncheckedException {

    @Serial
    private static final long serialVersionUID = 1L;

    public ForbiddenException(int code, String message) {
        super(code, message);
    }

    public static ForbiddenException wrap(BaseExceptionCode ex) {
        return new ForbiddenException(ex.getCode(), ex.getMsg());
    }

    @Override
    public String toString() {
        return "ForbiddenException [message=" + this.getMessage() + ", code=" + this.getCode() + "]";
    }

}